/*
 * MAliceScanner.h
 *
 *  Created on: 2 Nov 2010
 *      Author: kn308
 */

#ifndef MALICESCANNER_H_
#define MALICESCANNER_H_

class MAliceDriver;

#include <cstdio>
#include "../Parser/MAliceParser.hpp"

#define YY_DECL                                   \
    yy::MAliceParser::token_type                  \
    MAlice::Scanner::scan                         \
    (                                             \
      yy::MAliceParser::semantic_type* yylval,    \
      yy::MAliceParser::location_type* yylloc     \
    )

namespace MAlice
{

class Scanner
{
public:
	Scanner()
	{
	}

	virtual ~Scanner()
	{
	}

	/** This is the main lexing function. It is generated by flex according to
	 * the macro declaration YY_DECL above. The generated bison parser then
	 * calls this virtual function to fetch new tokens. */
	virtual yy::MAliceParser::token_type scan(
			yy::MAliceParser::semantic_type* yylval,
			yy::MAliceParser::location_type* yylloc);
};

} // namespace MAlice

#endif /* MALICESCANNER_H_ */
